package com.mall.config;


import org.springframework.context.annotation.Configuration;

@Configuration  //代替spring xml文件，某些第三方的类要纳入spring容器管理 ，需在此类的方法中去实现
public class BeanCotainer {
    /**
    @Bean(name = "jdbcTeamplate")  //等价于<bean id=jdbcTeamplate class="org.springframework.jdbc.core.JdbcTemplate">
    public JdbcTemplate getJdbcTeamplate(){

        return  null;
    }
*/
    /*
    @Bean(name = "sqlSessionTemplate")
    public SqlSessionTemplate getSqlSessionTeamplate(){

        SqlSessionFactory sqlSessionFactoryBean = null;
        try {
            sqlSessionFactoryBean = new SqlSessionFactoryBuilder().build(new FileInputStream("xxx"));
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        return  new SqlSessionTemplate(sqlSessionFactoryBean);
    }*/
}
